import request from '@/utils/request.js'

/**
 * 获取用户列表
 */
export function getUsers(params) {
    return request({
        url: '/user',
        method: 'get',
        params
    });
}
/**
 * 添加用户
 * @param {*} user 
 */
export function addUser(user) {
    return request({
        url: '/user',
        method: 'post',
        data: user
    });
}

/**
 * 修改用户
 */
export function updateUser(user){
    return request({
        url: '/user',
        method: 'put',
        data: user
    });
}

 /**
  * 删除
  */
 export function deleteUser(id) {
    return request({
        url: '/user/'+id,
        method: 'delete'
    });
}